package com.grad.why.studentsystem.mapper;

import com.grad.why.studentsystem.domain.Classinfo;
import com.grad.why.studentsystem.domain.ClassinfoExample;
import com.grad.why.studentsystem.domain.Student;
import com.grad.why.studentsystem.domain.current.CurrentClassinfo;
import com.grad.why.studentsystem.domain.current.PersonArriveInfoNameAndMax;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ClassinfoMapper {
    int countByExample(ClassinfoExample example);

    int deleteByExample(ClassinfoExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Classinfo record);

    int insertSelective(Classinfo record);

    List<Classinfo> selectByExample(ClassinfoExample example);

    Classinfo selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Classinfo record, @Param("example") ClassinfoExample example);

    int updateByExample(@Param("record") Classinfo record, @Param("example") ClassinfoExample example);

    int updateByPrimaryKeySelective(Classinfo record);

    int updateByPrimaryKey(Classinfo record);

    List<Classinfo> getClassInfos();

    List<CurrentClassinfo> getClassInfoList(@Param("offset") int offset, @Param("limit") int limit, @Param("sort") String sort, @Param("search") String search);

    long getClassInfoListLength(@Param("search") String search);

    int getMaxId();

    int selectByclassName(@Param("classname") String classname);

    int ClassNameIsExist(@Param("classname") String classname);

    List<Classinfo> getClassInfosByProjectId(@Param("id") Integer id);

    int getClassIdByClassName(@Param("className") String className);

    List<PersonArriveInfoNameAndMax> getAllClassStudentArrivedInfo(@Param("classid") Integer classid);

    List<Float> getAllClassStudentArrivedInfoValues(@Param("classid") Integer classid);
}